﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Kangaroo.Model;

namespace Kangaroo.Controls.Tests
{
    public partial class Form1 : Form
    {
        List<MapMarker> _markers = new List<MapMarker>();

        public Form1()
        {
            InitializeComponent();
        }

        private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
        {
            var mapMarker = new MapMarker(new ChannelInfo("", 0, "EId", 0), pictureBox1.ClientSize, new Point(e.X, e.Y));
            _markers.Add(mapMarker);
            pictureBox1.Controls.Add(mapMarker);
        }

        private void pictureBox1_Resize(object sender, EventArgs e)
        {
            foreach(var mapMarker in _markers)
            {
                mapMarker.UpdateParentSize(pictureBox1.ClientSize);
            }
        }
    }
}
